﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Areas/CustomerAdmin/Customer.Master" CodeBehind="ViewGroupsMails.aspx.cs" Inherits="OnlineBusinesses.Areas.CustomerAdmin.MailBox.ViewGroupsMails" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="ContentCustomerAdmin">
    <div class="col-md-12" style="padding: 10px;">
        <asp:HiddenField ID="hdGroupID" runat="server" />
        <div class="col-md-12" style="padding: 0px;">
            <h3 style="font-weight: bold;">
                <asp:Label ID="lbGroupName" runat="server" Text="Label" ></asp:Label>
            </h3>
        </div>
        <div class="col-md-12" style="padding: 0px;">
            <h5 style="font-weight: bold;">
                <asp:Label ID="lbGroupDesc" runat="server" Text="Label"></asp:Label>
            </h5>
        </div>
        <div class="col-md-12" style="padding: 10px 0px;">
            <%--<span class="pull-left btn btn-default" style="border-radius: 0px; background: #fdfdfd;">
                <a href="ChooseGroupsMails.aspx" style="color: #333; text-decoration: none;">Chỉ định người dùng</a>
            </span>--%>
            <asp:Label runat="server" Text="Chọn phòng ban"></asp:Label>
            <br />
            <asp:DropDownList runat="server" AutoPostBack="true" ID="ddlDepartment" class="input_add" OnSelectedIndexChanged="ddlDepartment_SelectedIndexChanged"></asp:DropDownList>
            <br />
            <asp:Label runat="server" Text="Chọn người dùng"></asp:Label>
            <br />
            <asp:DropDownList runat="server" AutoPostBack="true" ID="ddlAccount" class="input_add"></asp:DropDownList>
            <br />
            <asp:Button runat="server" ID="btnAdd" OnClick="btnAdd_Click" class="btn btn-success" Text="Thêm tài khoản"/>
        </div>
    </div>
    <div class="col-md-12" style="padding: 10px 0px;">
        <div class="table-responsive col-md-12 col-xs-12">
            
            <asp:ListView
                ID="lvGroup"
                runat="server">
                <LayoutTemplate>
                    <table class="table-bordered table-striped table">
                        <thead>
                            <tr>
                                <th style="width: 70px;">Avatar</th>
                                <th>Họ Tên</th>
                                <th>Chức vụ</th>
                                <th>Email</th>
                                <th>Ngày tham gia</th>
                                <th>Số điện thoại</th>
                                <th style="width: 100px;">Tùy chỉnh</th>
                            </tr>
                        </thead>
                        <!-- Trưởng nhóm sử dụng như 1 radio-->
                        <tbody>
                            <tr id="ItemPlaceholder" runat="server">

                            </tr>
                        </tbody>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td style="vertical-align: middle; text-align: center;">
                            <img class="img-circle img img-thumbnail" style="width: 100%;" src="<%# Eval("Avatar")%>" /></td>
                        <td style="vertical-align: middle;"><%# Eval("AccountName")%></td>
                        <td style="vertical-align: middle;"><%# Eval("Function")%></td>
                        <td style="vertical-align: middle;"><%# Eval("Email")%></td>
                        <td style="vertical-align: middle;"><%# DateTime.Parse(Eval("CreateDate").ToString()).ToString("dd/MM/yyyy") %></td>
                        <td style="vertical-align: middle;"><%# Eval("Phone")%></td>
                        <td style="vertical-align: middle; text-align: center;">
                            <asp:LinkButton ID="btnDel" runat="server" 
                                OnCommand="btnDel_Click" 
                                CommandArgument='<%#Eval("AccountID") %>' 
                                OnClientClick="return confirm('Bạn có chắc là muốn xoá không?');" class="btn btn-default" style="border-radius: 0px;" data-toggle="tooltip" data-placement="bottom" title="Người dùng rời nhóm"><i class="fa fa-sign-out"></i></asp:LinkButton>
                       </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </div>
    </div>
</asp:Content>
